how to create api with sql server